package view;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.EventQueue;

import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;
import javax.swing.border.EmptyBorder;

import model.ModelClass;

import control.ActListener;
import control.FunktionMethods;
import control.MouseListener;

public class MainF extends JFrame {

	private JPanel contentPane;
	CenterPanel center;
	RightPanel right;
	ModelClass model;
	ActListener ac;
	MouseListener mL;
	FunktionMethods funktionMethods;
	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					MainF frame = new MainF();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public MainF() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setPreferredSize(new Dimension(1360, 710));
		setResizable(false);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(0,0,0,0));
		setContentPane(contentPane);
		contentPane.setLayout(new BorderLayout(0, 0));
	
		System.setProperty("awt.useSystemAAFontSettings","on");
		System.setProperty("swing.aatext", "true");
		try {
		    for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
		        if ("Nimbus".equals(info.getName())) {
		            UIManager.setLookAndFeel(info.getClassName());
		            break;
		        }
		    }
		} catch (Exception e) {
		    // If Nimbus is not available, you can set the GUI to another look and feel.
		}
		
		model = new ModelClass(this);
		funktionMethods = new FunktionMethods(this);
		ac = new ActListener(this);
		mL = new MouseListener(this);
		
		
		right = new RightPanel(this);
		contentPane.add(right,BorderLayout.EAST);
		
		center = new CenterPanel(this);
		contentPane.add(center,BorderLayout.CENTER);
		
		pack();
	}

	public ActListener getAc() {
		return ac;
	}

	public void setAc(ActListener ac) {
		this.ac = ac;
	}

	public MouseListener getmL() {
		return mL;
	}

	public void setmL(MouseListener mL) {
		this.mL = mL;
	}

	public CenterPanel getCenter() {
		return center;
	}

	public void setCenter(CenterPanel center) {
		this.center = center;
	}

	public RightPanel getRight() {
		return right;
	}

	public void setRight(RightPanel right) {
		this.right = right;
	}

	public ModelClass getModel() {
		return model;
	}

	public void setModel(ModelClass model) {
		this.model = model;
	}

	public FunktionMethods getFunktionMethods() {
		return funktionMethods;
	}

	public void setFunktionMethods(FunktionMethods funktionMethods) {
		this.funktionMethods = funktionMethods;
	}

}
